<!DOCTYPE HTML>
<html xmlns="http://www.w3.org/1999/xhtml">

<head lang="zh-CN">
  <meta charset="UTF-8" />
  <title>Typecho 安装程序</title>
  <link rel="stylesheet" type="text/css" href="/static/admin/css/normalize.css" />
  <link rel="stylesheet" type="text/css" href="/static/admin/css/grid.css" />
  <link rel="stylesheet" type="text/css" href="/static/admin/css/style.css" />
</head>

<body>
  <div class="typecho-install-patch">
    <h1>Typecho</h1>
    <ol class="path">
      <li>
        <span>1</span>欢迎使用</li>
      <li class="current">
        <span>2</span>初始化配置</li>
      <li>
        <span>3</span>开始安装</li>
      <li>
        <span>4</span>安装成功</li>
    </ol>
  </div>
  <div class="container">
    <div class="row">
      <div class="col-mb-12 col-tb-8 col-tb-offset-2">
        <div class="column-14 start-06 typecho-install">
          <form method="post" action="?config" name="config">
            <h1 class="typecho-install-title">确认您的配置</h1>
            <div class="typecho-install-body">
              <h2>数据库配置</h2>
              <ul class="typecho-option">
                <li>
                  <label for="dbAdapter" class="typecho-label">数据库适配器</label>
                  <select name="dbAdapter" id="dbAdapter">
                    <option value="Pdo_Mysql">Pdo 驱动 Mysql 适配器</option>
                  </select>
                  <p class="description">请根据您的数据库类型选择合适的适配器</p>
                </li>



                <li>
                  <label class="typecho-label" for="dbHost">数据库地址</label>
                  <input type="text" class="text" name="dbHost" id="dbHost" value="localhost" />
                  <p class="description">您可能会使用 "localhost"</p>
                </li>
                <li>
                  <label class="typecho-label" for="dbPort">数据库端口</label>
                  <input type="text" class="text" name="dbPort" id="dbPort" value="3306" />
                  <p class="description">如果您不知道此选项的意义, 请保留默认设置</p>
                </li>
                <li>
                  <label class="typecho-label" for="dbUser">数据库用户名</label>
                  <input type="text" class="text" name="dbUser" id="dbUser" value="root" />
                  <p class="description">您可能会使用 "root"</p>
                </li>
                <li>
                  <label class="typecho-label" for="dbPassword">数据库密码</label>
                  <input type="password" class="text" name="dbPassword" id="dbPassword" value="" />
                </li>
                <li>
                  <label class="typecho-label" for="dbDatabase">数据库名</label>
                  <input type="text" class="text" name="dbDatabase" id="dbDatabase" value="typecho" />
                  <p class="description">请您指定数据库名称</p>
                </li>

                <input type="hidden" name="dbCharset" value="utf8" />

                <li>
                  <label class="typecho-label" for="dbCharset">数据库编码</label>
                  <select name="dbCharset" id="dbCharset">
                    <option value="utf8">utf8</option>
                    <option value="utf8mb4">utf8mb4</option>
                  </select>
                  <p class="description">选择 utf8mb4 编码至少需要 MySQL 5.5.3 版本</p>
                </li>

                <li>
                  <label class="typecho-label" for="dbEngine">数据库引擎</label>
                  <select name="dbEngine" id="dbEngine">
                    <option value="MyISAM">MyISAM</option>
                    <option value="InnoDB">InnoDB</option>
                  </select>
                </li>
                <li>
                  <label class="typecho-label" for="dbPrefix">数据库前缀</label>
                  <input type="text" class="text" name="dbPrefix" id="dbPrefix" value="typecho_" />
                  <p class="description">默认前缀是 "typecho_"</p>
                </li>
              </ul>

              <script>
                var _select = document.config.dbAdapter;
                _select.onchange = function () {
                  setTimeout("window.location.href = 'install.php?config&dbAdapter=" + this.value + "'; ", 0);
                }
              </script>

              <h2>创建您的管理员帐号</h2>
              <ul class="typecho-option">
                <li>
                  <label class="typecho-label" for="userUrl">网站地址</label>
                  <input type="text" name="userUrl" id="userUrl" class="text" value="http://www.typecho.local" />
                  <p class="description">这是程序自动匹配的网站路径, 如果不正确请修改它</p>
                </li>
                <li>
                  <label class="typecho-label" for="userName">用户名</label>
                  <input type="text" name="userName" id="userName" class="text" value="admin" />
                  <p class="description">请填写您的用户名</p>
                </li>
                <li>
                  <label class="typecho-label" for="userPassword">登录密码</label>
                  <input type="password" name="userPassword" id="userPassword" class="text" value="" />
                  <p class="description">请填写您的登录密码, 如果留空系统将为您随机生成一个</p>
                </li>
                <li>
                  <label class="typecho-label" for="userMail">邮件地址</label>
                  <input type="text" name="userMail" id="userMail" class="text" value="webmaster@yourdomain.com" />
                  <p class="description">请填写一个您的常用邮箱</p>
                </li>
              </ul>
            </div>
            <input type="hidden" name="action" value="config" />
            <p class="submit">
              <button type="submit" class="btn primary">确认, 开始安装 &raquo;</button>
            </p>
          </form>

        </div>
      </div>
    </div>
  </div>